package class_code.obj_2_extends;

/**
 * java通过 implement 来实现多继承
 */

interface hobby {


    void singe();

    void dance();

    void rap();
}

interface sports {
    void basketball();
}

class Ikun implements hobby, sports {
    final String name = "蔡徐坤";


    @Override
    public void singe() {
        System.out.println(this.name + "在唱歌！");
    }

    @Override
    public void dance() {
        System.out.println(this.name + "在跳舞！");
    }

    @Override
    public void rap() {
        System.out.println(this.name + "在rap！");
    }

    @Override
    public void basketball() {
        System.out.println(this.name + "在篮球！");
    }

    void show(){
        singe();
        dance();
        rap();
        basketball();
    }
}

public class ExtendsDemo3 {
    public static void main(String[] args) {
        Ikun ikun = new Ikun();
        ikun.show();
    }


}
